package com.sg.controller.pbff;

import com.sg.service.biz.pbff.BehaviorTypeService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "BehaviorType", tags = {"BehaviorType"})
@RestController
// @RequestMapping("/poms/behaviorType/")
public class BehaviorTypeController {
    @Autowired
    BehaviorTypeService behaviorTypeService;

    /**
     * B1-1查询行为类型列表（平台）
     * gen by moon at 10/23/2022, 9:18:45 PM
     */
    @PostMapping("/oms/platform/behaviorType/queryBehaviorTypeList")
    @ApiOperation(value = "B1-1查询行为类型列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryBehaviorTypeListRespDto> queryBehaviorTypeList(@RequestBody(required = false) @Validated BffQueryBehaviorTypeListReqDto reqDTO) {
        return OkrResult.success(behaviorTypeService.queryBehaviorTypeList(reqDTO));
    }

    /**
     * B1-1修改行为类型（平台）
     * gen by moon at 9/1/2022, 7:22:36 PM
     */
    @PostMapping("/oms/platform/behaviorType/updateBehaviorType")
    @ApiOperation(value = "B1-1修改行为类型（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateBehaviorTypeRespDto> updateBehaviorType(@RequestBody(required = false) @Validated BffUpdateBehaviorTypeReqDto reqDTO) {
        return OkrResult.success(behaviorTypeService.updateBehaviorType(reqDTO));
    }

    /**
     * B1-1新增行为类型（平台）
     * gen by moon at 9/1/2022, 7:22:35 PM
     */
    @PostMapping("/oms/platform/behaviorType/addBehaviorType")
    @ApiOperation(value = "B1-1新增行为类型（平台）", response = OkrResult.class)
    public OkrResult<BffAddBehaviorTypeRespDto> addBehaviorType(@RequestBody(required = false) @Validated BffAddBehaviorTypeReqDto reqDTO) {
        return OkrResult.success(behaviorTypeService.addBehaviorType(reqDTO));
    }

    /**
     * B1-1查询行为类型详情（平台）
     * gen by moon at 10/28/2022, 8:54:27 PM
     */
    @PostMapping("/oms/platform/behaviorType/queryBehaviorTypeDetail")
    @ApiOperation(value = "B1-1查询行为类型详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryBehaviorTypeDetailRespDto> queryBehaviorTypeDetail(@RequestBody(required = false) @Validated BffQueryBehaviorTypeDetailReqDto reqDTO) {
        return OkrResult.success(behaviorTypeService.queryBehaviorTypeDetail(reqDTO));
    }

    /**
     * B1查询赋能的行为类型列表(管理)(边界)
     * gen by moon at 10/25/2022, 10:01:16 AM
     */
    @PostMapping("/oms/platform/mgt/behaviorType/queryEnablingBehaviorTypeListBorder")
    @ApiOperation(value = "B1查询赋能的行为类型列表(管理)(边界)", response = OkrResult.class)
    public OkrResult<BffQueryEnablingBehaviorTypeListBorderRespDto> queryEnablingBehaviorTypeListBorder(@RequestBody(required = false) @Validated BffQueryEnablingBehaviorTypeListBorderReqDto reqDTO) {
        return OkrResult.success(behaviorTypeService.queryEnablingBehaviorTypeListBorder(reqDTO));
    }

}

